package com.qf.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.admin.entity.Goods;
import com.qf.admin.entity.Item;
import com.qf.admin.pojo.AddGoods;
import com.qf.admin.pojo.EditGoods;
import com.qf.admin.pojo.QueryGoods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface IGoodsMapper extends BaseMapper<Goods> {

    //获取所有的商品分页信息
    List<Goods> getGoodsData(QueryGoods queryGoods);

    void deleteGoodsById(Integer id);

    EditGoods editGoodsById(@Param("id") Integer id);

    void editGoodsAndSave(EditGoods editGoods);

    List<Item> getAllItem();

    void batchInsert(List<Goods> goodsList);

    //获取全部的商品信息
    List<Goods> getAllGoods(QueryGoods queryGoods);

    //添加商品
    void addGoodsMethod(AddGoods addGoods);

    //查看商品id是否存在
    Integer getGoodsId(@Param(("id")) Integer id);
}
